﻿/*

  The contents of this file are subject to the Mozilla Public License Version
  1.1 (the "License"); you may not use this file except in compliance with
  the License. You may obtain a copy of the License at 
  
           http://www.mozilla.org/MPL/ 
  
  Software distributed under the License is distributed on an "AS IS" basis,
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  for the specific language governing rights and limitations under the License. 
  
  The Original Code is AST'r Framework.
  
  The Initial Developer of the Original Code is
  ALCARAZ Marc (aka eKameleon) <vegas@ekameleon.net>.
  Portions created by the Initial Developer are Copyright (C) 2004-2007
  the Initial Developer. All Rights Reserved.
  
  Contributor(s) :
  
*/

import andromeda.vo.SimpleValueObject;

/**
 * This value object contains all attributes to create a shape in the whiteboard. 
 * @author eKameleon
 */
class ewhiteboard.vo.ShapeVO extends SimpleValueObject 
{
	
	/**
	 * Creates a new ShapeVO instance.
	 * @param init A generic object containing properties with which to populate the newly instance. If this argument is null, it is ignored.
	 */
	public function ShapeVO( init:Object ) 
	{
		super(init) ;
	}

	/**
	 * The array representation of the canvas of this shape.
	 */
	public var canvas:Array ;
	
	/**
	 * The color of the shape.
	 */
	public var color:Number ;
	
	/**
	 * The Plane object value of this shape. 
	 * The plane generic object contains the a, b, c and d coordinate.
	 * @see pegas.geom.Plane
	 * @see pegas.util.PlaneUtil
	 */
	public var plane:Object ;
	
	/**
	 * The text value of this shape.
	 */
	public var text:String ;
	
	/**
	 * The type of this shape.
	 * @see WhiteBoardType class.
	 */
	public var type:Number ;

	/**
	 * The x position of the shape.
	 */
	public var x:Number ;
	
	/**
	 * The y position of the shape.
	 */
	public var y:Number ;
	
	/**
	 * Register the value object to be use in the AMF exchange of datas.
	 */
	public static function register( id:String ):Void
	{
		Object.registerClass( id || "ShapeVO" , ShapeVO ) ;
	}

}